package com.song.web.service;

import com.song.user.pojo.User;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 宋伟宁
 * @Date 2024/1/5
 * @Version 1.0
 **/
@FeignClient(value = "user-service7000",path = "user")
public interface UserFeignService {
    @GetMapping("/")
    Result findUser() ;

    @PostMapping("/login")
    Result login(@RequestParam("username") String username,@RequestParam("password") String password);

    @PostMapping("/save")
    Result save(@RequestBody User user);

    @GetMapping("/hasName/{name}")
    public Result hasName(@PathVariable("name") String name);
}
